<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>    
<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8" />
		<title></title>
		<!-- 包含头部信息用于适应不同设备 -->
    	<meta name="viewport" content="width=device-width, initial-scale=1">
		<link rel="stylesheet" href="bootstrap-3.3.7/css/bootstrap.min.css" />
		<script type="text/javascript" src="js/jquery-2.2.3.min.js" ></script>
		<script type="text/javascript" src="bootstrap-3.3.7/js/bootstrap.min.js" ></script>
	</head>
	<body>
		<div class="container">
			
			<%@include file="header.jsp" %>
			
			<div class="row" >
				
				<div class="col-md-12" style="min-height: 500px;">
					<a href="student?action=addStudent" class="btn btn-info" style="margin-bottom: 10px;">新增学生信息</a>
					<table class="table table-bordered">
						<thead>
							<tr>
								<th>学号</th>
								<th>姓名</th>
								<th>年龄</th>
								<th>性别</th>
								<th>联系方式</th>
								<th>学校</th>
								<th>年级</th>
								<th>专业</th>
								<th>操作</th>
							</tr>
						</thead>
						<tbody>
							
							<c:forEach items="${stus}" var="stu">
								<tr>
									<td>${stu.sid}</td>
									<td>${stu.sname}</td>
									<td>${stu.age}</td>
									<td>${stu.sex}</td>
									<td>${stu.phone}</td>
									<td>${stu.school}</td>
									<td>${stu.grade}</td>
									<td>${stu.major}</td>
									<td>
										<a href="student?action=toupdate&sid=${stu.sid}" class="btn btn-info">修改</a>
										<a href="student?action=delete&sid=${stu.sid}" class="btn btn-info">删除</a>
									</td>
								</tr>
							</c:forEach>
							
						</tbody>
					</table>
				</div>
				
			</div>
			
			${pageTool}
			
			<%@include file="footer.jsp" %>
		</div>
		
	</body>
</html>
